package nl.vu.few.ibivu.biomodels.client;

import nl.vu.few.ibivu.biomodels.shared.Model;
import nl.vu.few.ibivu.biomodels.shared.PetrifierModelExecution;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ModelServiceAsync extends PagerServiceAsync<Model> {
	void count(AsyncCallback<Integer> callback) throws IllegalArgumentException;
	void fetch(Long modelId, AsyncCallback<Model> callback) throws IllegalArgumentException;
	void fetch(Integer startRow, Integer endRow, String order, AsyncCallback<GwtRpcResultList<Model>> callback) throws IllegalArgumentException;
	void save(Model model, AsyncCallback<Model> callback) throws IllegalArgumentException;
	void remove(Long modelId, AsyncCallback<Void> callback) throws IllegalArgumentException;
	void execute(Long modelId, AsyncCallback<Void> callback) throws IllegalArgumentException;
	void fetchExecution(Long modelId, AsyncCallback<PetrifierModelExecution> callback) throws IllegalArgumentException;
	void isExecuted(Long modelId, AsyncCallback<Boolean> callback) throws IllegalArgumentException;
}
